﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPageAdmin.master" AutoEventWireup="true" CodeFile="Quanlydaily.aspx.cs" Inherits="admin_Quanlydaily" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 99px;
        }
        .headertilte{
         	font-size:35px;
            color:#39629F;
            font-weight:bold;
            text-align:center;
            margin:0;
            width:100%;
            padding:10px 0px 10px 0px;
            border-bottom:1px solid #ededed;
         	}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
           <div style="border:1px solid gray;width:100%;height:auto;margin-bottom:20px;">
        <div style="width:100%;background-color:black;color:White;font-weight:bold;text-align:center;font-size:large">Quản Lý Đại Lý</div>
        <div>
            <table style="width: 100%;">
                <tr>
                    <td align="center" style="padding-left:20px;width:100px">
                        <asp:Button ID="btnAddState" runat="server" onclick="btnAddState_Click" 
                            Text="Thêm đại lý" />
                       </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
            <asp:GridView ID="gvDaiLy" runat="server" AutoGenerateColumns="False" 
        EnableModelValidation="True" Width="100%" CellPadding="4" onpageindexchanging="gvDaiLy_PageIndexChanging" 
                onrowdatabound="gvDaiLy_RowDataBound" onrowdeleting="gvDaiLy_RowDeleting" 
                onselectedindexchanged="gvDaiLy_SelectedIndexChanged" ForeColor="#333333" 
                GridLines="None" AllowPaging="True">
                <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="STT">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text="<%# Container.DataItemIndex + 1 %>"></asp:Label> 
                                    <asp:HiddenField ID="hdfmasp" runat="server" Value='<%# Eval("iddl") %>' />
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" Width="30px" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="Tên ĐL" DataField="TenDaiLy" />
            <asp:BoundField HeaderText="Địa Chỉ" DataField="DiaChi" />
            <asp:BoundField HeaderText="Điện Thoại" DataField="DienThoai" />
            <asp:BoundField HeaderText="Fax" DataField="Fax" />
            <asp:CommandField ShowSelectButton="True" SelectText="" ButtonType="Image" 
                                SelectImageUrl="~/images/file-edit-icon.png" >
                            <ItemStyle Width="20px" />
            </asp:CommandField>
            <asp:CommandField ShowDeleteButton="True" DeleteText="" ButtonType="Image" 
                DeleteImageUrl="~/images/Close-2-icon.png" >
            <ItemStyle Width="20px" />
            </asp:CommandField>
        </Columns>
        <FooterStyle BackColor="#990000" ForeColor="White" Font-Bold="True" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" Height="25px" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <RowStyle HorizontalAlign="Center" 
                    Font-Size="Medium" Height="24px" BackColor="#FFFBD6" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
    </asp:GridView>
    <div style="margin-top:5px;">
    </div>
        </asp:View>
        <asp:View ID="View2" runat="server">
        <div class="headertilte">
        <asp:Label ID="lbhead" runat="server" ></asp:Label></div>
            <table style="font-size:large;width:700px;margin:0 auto" cellpadding="5" cellspacing="5">
                <tr>
                    <td class="style2">
                        Tên đại lý</td>
                    <td>
                        <asp:TextBox ID="txtTenDaiLy" runat="server"></asp:TextBox>
                        <asp:HiddenField ID="hdlid" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        Logo</td>
                    <td>
                        <asp:Image ID="imgLogo" runat="server" Height="87px" Width="103px" />
                        <asp:FileUpload ID="fLogo" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        Địa chỉ</td>
                    <td>
                        <asp:TextBox ID="txtDiaChi" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        Điện thoại</td>
                    <td>
                        <asp:TextBox ID="txtDienThoai" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        Fax</td>
                    <td>
                        <asp:TextBox ID="txtFax" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        Email</td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        Mô tả</td>
                    <td>
                        <asp:TextBox ID="txtMoTa" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;</td>
                    <td>
                        <asp:Button ID="btnAddnew" runat="server" Text="Thêm mới" 
                            onclick="btnAddnew_Click" />
                        <asp:Button ID="btnEdit" runat="server" Text="Chỉnh sửa" 
                            onclick="btnEdit_Click" />
                        <asp:Button ID="btnBack" runat="server" onclick="btnBack_Click" 
                            Text="Trở lại" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>

